package com.big.cmn;


import com.big.model.model.merchandise.MerchandiseSpecificationDict;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "service-cmn")
@Repository  //创建一个名字叫DictFeignClient的DictFeignClientImpl实例。
public interface DictFeignClient {

    //根据dictcode和  value查询
    @GetMapping("/api/cmn/dict/getName/{dictCode}/{value}")
    public String getName(@PathVariable("dictCode") String dictCode, @PathVariable("value") String value);

    //根据value查询
    @GetMapping("/api/cmn/dict/getName/{value}")
    public String getName(@PathVariable("value") String value);


    //根据dictcode和  value查询
    @GetMapping("/api/cmn/specificationDict/getName/{dictCode}/{value}")
    public String getSpeName(@PathVariable("dictCode") String dictCode, @PathVariable("value") String value);

    //根据value查询
    @GetMapping("/api/cmn/specificationDict/getName/{value}")
    public String getSpeName(@PathVariable("value") String value);

    @ApiOperation(value = "根据数据id查询子数据列表")
    @GetMapping("/api/cmn/specificationDict/findChildData/{id}")
    public List<MerchandiseSpecificationDict> findChildData(@PathVariable("id") Long id);


}
